import React, { Component } from 'react';
// import './style/codeBox.css';

class CodeBox extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }

  render() {
    const { code, type } = this.props;
    return (
      <div className="codeBox" style={{ display: type && type === 'code' ? 'block' : 'none' }}>
        <pre>{ code ? code : '' }</pre>
      </div>
    );
  }
}


export default CodeBox;

